import { Component } from 'react';
import ReactDOM from 'react-dom/client';

class App extends Component {
  // 为组件提供状态
  state = {
    count: 0,
    list: [],
    isLoading: true,
  };

  render() {
    // 通过 this.state 来访问类组件的状态
    return <div>{this.state.count}</div>;
  }
}

ReactDOM.createRoot(document.getElementById('root')).render(<App />);
